package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BdDefdoclistMapper;
import com.ruoyi.system.domain.BdDefdoclist;
import com.ruoyi.system.service.IBdDefdoclistService;
import com.ruoyi.common.core.text.Convert;

/**
 * 自定义档案列Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-08
 */
@Service
public class BdDefdoclistServiceImpl implements IBdDefdoclistService 
{
    @Autowired
    private BdDefdoclistMapper bdDefdoclistMapper;

    /**
     * 查询自定义档案列
     * 
     * @param pkDefdoclist 自定义档案列主键
     * @return 自定义档案列
     */
    @DataSource(DataSourceType.SLAVE)
    @Override
    public BdDefdoclist selectBdDefdoclistByPkDefdoclist(String pkDefdoclist)
    {
        return bdDefdoclistMapper.selectBdDefdoclistByPkDefdoclist(pkDefdoclist);
    }

    /**
     * 查询自定义档案列列表
     * 
     * @param bdDefdoclist 自定义档案列
     * @return 自定义档案列
     */
    @DataSource(DataSourceType.SLAVE)
    @Override
    public List<BdDefdoclist> selectBdDefdoclistList(BdDefdoclist bdDefdoclist)
    {
        return bdDefdoclistMapper.selectBdDefdoclistList(bdDefdoclist);
    }

    /**
     * 新增自定义档案列
     * 
     * @param bdDefdoclist 自定义档案列
     * @return 结果
     */
    @Override
    public int insertBdDefdoclist(BdDefdoclist bdDefdoclist)
    {
        return bdDefdoclistMapper.insertBdDefdoclist(bdDefdoclist);
    }

    /**
     * 修改自定义档案列
     * 
     * @param bdDefdoclist 自定义档案列
     * @return 结果
     */
    @Override
    public int updateBdDefdoclist(BdDefdoclist bdDefdoclist)
    {
        return bdDefdoclistMapper.updateBdDefdoclist(bdDefdoclist);
    }

    /**
     * 批量删除自定义档案列
     * 
     * @param pkDefdoclists 需要删除的自定义档案列主键
     * @return 结果
     */
    @Override
    public int deleteBdDefdoclistByPkDefdoclists(String pkDefdoclists)
    {
        return bdDefdoclistMapper.deleteBdDefdoclistByPkDefdoclists(Convert.toStrArray(pkDefdoclists));
    }

    /**
     * 删除自定义档案列信息
     * 
     * @param pkDefdoclist 自定义档案列主键
     * @return 结果
     */
    @Override
    public int deleteBdDefdoclistByPkDefdoclist(String pkDefdoclist)
    {
        return bdDefdoclistMapper.deleteBdDefdoclistByPkDefdoclist(pkDefdoclist);
    }
}
